package com.usian.controller;

import com.usian.pojo.User;
import com.usian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("user")
@RestController
@RefreshScope
public class UserController {

    @Autowired
    private UserService userService;



    @RequestMapping("findById/{id}")
    public User findById(@PathVariable Integer id){
        return userService.findById(id);
    }
}
